package ch7;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Shuzisanjiaoxing {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("你想要几行数字：");
        int n = in.nextInt();
        for (int i = 1; i <= n; i++) {
            //左边的空格
            for (int j = n; j >i; j--) {
                System.out.print(" ");
            }

            for (int j = 1; j <= 2 * i - 1; j++) {
                System.out.print(i);
            }
            System.out.println();
        }
    }
}
